package com.jiegui.business.service.impl;

import java.util.List;
import com.jiegui.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.jiegui.business.mapper.GoodsInfoMapper;
import com.jiegui.business.domain.GoodsInfo;
import com.jiegui.business.service.GoodsInfoService;

/**
 * 商品信息Service业务层处理
 * 
 * @author wuqicheng
 * @date 2024-11-20
 */
@Service
public class GoodsInfoServiceImpl extends ServiceImpl<GoodsInfoMapper, GoodsInfo> implements GoodsInfoService
{
    @Resource
    private GoodsInfoMapper goodsInfoMapper;

    /**
     * 查询商品信息
     * 
     * @param id 商品信息主键
     * @return 商品信息
     */
    @Override
     public GoodsInfo selectGoodsInfoById(String id)
    {
        return goodsInfoMapper.selectById(id);
    }

    /**
     * 查询商品信息列表
     * 
     * @param goodsInfo 商品信息
     * @return 商品信息
     */
    @Override
    public List<GoodsInfo> selectGoodsInfoList(GoodsInfo goodsInfo)
    {
        return goodsInfoMapper.selectGoodsInfoList(goodsInfo);
    }

    /**
     * 新增商品信息
     * 
     * @param goodsInfo 商品信息
     * @return 结果
     */
    @Override
    public  int insertGoodsInfo(GoodsInfo goodsInfo)
    {
        return goodsInfoMapper.insert(goodsInfo);
    }

    /**
     * 修改商品信息
     * 
     * @param goodsInfo 商品信息
     * @return 结果
     */
    @Override
    public  int updateGoodsInfo(GoodsInfo goodsInfo)
    {

        return goodsInfoMapper.updateById(goodsInfo);
    }




}
